Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BO : Right side block of attribute and attribute groups in combination tab not appears. #10392

Closed
wants to merge 8 commits into from

Conversation

dineshbadrukhiya
Copy link
Contributor

@dineshbadrukhiya dineshbadrukhiya commented Sep 12, 2018

Questions Answers
Branch? develop
Description? In multi-shop and multi-language, Right side block of attribute and attribute groups in combination tab not appears.
Type? bug fix
Category? BO
BC breaks? no
Deprecations? no
Fixed ticket? #10377
How to test? Check the back-office right side block in combination tab.

This change is Reviewable

@prestonBot
Copy link
Collaborator

Hello @dbadrukhiya!

This is your first pull request on the PrestaShop project. Thank you, and welcome to this Open Source community!

@prestonBot prestonBot added develop Branch Bug Type: Bug labels Sep 12, 2018
Copy link
Contributor

@MathiasReker MathiasReker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code standard

@@ -543,7 +543,7 @@ public function formAction($id, Request $request)
}

$doctrine = $this->getDoctrine()->getManager();
$attributeGroups = $doctrine->getRepository('PrestaShopBundle:Attribute')->findByLangAndShop(1, 1);
$attributeGroups = $doctrine->getRepository('PrestaShopBundle:Attribute')->findByLangAndShop((int)$languages[0]['id_lang'], (int)['shop_id']);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be:
$attributeGroups = $doctrine->getRepository('PrestaShopBundle:Attribute')->findByLangAndShop((int) $languages[0]['id_lang'], (int) ['shop_id']);

Copy link
Contributor Author

@dineshbadrukhiya dineshbadrukhiya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 files reviewed, 2 unresolved discussions (waiting on @mreker and @dbadrukhiya)


src/PrestaShopBundle/Controller/Admin/ProductController.php, line 546 at r1 (raw file):

Previously, Mreker wrote…

Should be:
$attributeGroups = $doctrine->getRepository('PrestaShopBundle:Attribute')->findByLangAndShop((int) $languages[0]['id_lang'], (int) ['shop_id']);

Done.


src/PrestaShopBundle/Controller/Admin/ProductController.php, line 546 at r2 (raw file):

Previously, PierreRambaud (GoT) wrote…

(int) ['shop_id'] isn't an id..

id_shop ?

Copy link
Contributor Author

@dineshbadrukhiya dineshbadrukhiya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 files reviewed, 2 unresolved discussions (waiting on @mreker and @PierreRambaud)


src/PrestaShopBundle/Controller/Admin/ProductController.php, line 546 at r2 (raw file):

Previously, dbadrukhiya (Dinesh Badrukhiya) wrote…

id_shop ?

Done.

@PierreRambaud
Copy link
Contributor

@Quetzacoalt91 wdyt?

Copy link
Contributor Author

@dineshbadrukhiya dineshbadrukhiya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

anything need to change? @PierreRambaud @mreker

@dineshbadrukhiya
Copy link
Contributor Author

Can anyone help me to remove this. I was trying to open new request but by mistake it showing here and accidentally deleted theme.css file also.
untitled

@@ -543,7 +543,8 @@ public function formAction($id, Request $request)
}

$doctrine = $this->getDoctrine()->getManager();
$attributeGroups = $doctrine->getRepository('PrestaShopBundle:Attribute')->findByLangAndShop(1, 1);
$language = empty($languages[0]) ? ['id_lang' => 1, 'id_shop' => 1] : $languages[0];
$attributeGroups = $doctrine->getRepository('PrestaShopBundle:Attribute')->findByLangAndShop((int) $language['id_lang'], (int) ['id_shop']);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(int) ['id_shop'] is not and id.

@PierreRambaud
Copy link
Contributor

You must read https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History this is a really good article about how to rewrite history, from rewriting a git commit, to undo a commit, or squashing commits together =)

@dineshbadrukhiya
Copy link
Contributor Author

Thanks @PierreRambaud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Type: Bug develop Branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants